package com.risk.ctrl.enums;

import com.risk.ctrl.enums.service.EnumsBaseService;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;
@Getter
@AllArgsConstructor
public enum ErrorCodeMappingEnum implements EnumsBaseService {
    SUCCESS("000", "成功", ErrorCodeEnum.SUCCESS),
    SUCCESS_200("200", "成功", ErrorCodeEnum.SUCCESS),
    SEARCHING("100", "征信数据查询中", ErrorCodeEnum.SEARCHING),
    SEARCH_NUMBER_NOT_EXIST("101", "查询流水号不存在", ErrorCodeEnum.SEARCH_NUMBER_NOT_EXIST),
    NO_CREDIT_DATA("102", "无征信数据，查询历史已过期", ErrorCodeEnum.NO_CREDIT_DATA),
    CREDIT_SEARCH_ERROR("103", "征信数据查询错误", ErrorCodeEnum.CREDIT_SEARCH_ERROR),
    NO_SEARCH_RESULT("104", "查征请求异常，无查询数据", ErrorCodeEnum.NO_SEARCH_RESULT),
    SEARCHING_COST_FAIL("105", "查询扣款失败", ErrorCodeEnum.SEARCHING_COST_FAIL),
    SEARCHING_NUMBER_OVER_LIMIT("107", "查询次数超限", ErrorCodeEnum.SEARCHING_NUMBER_OVER_LIMIT),
    USER_IS_WHITE_USER("108", "该用户为征信白户", ErrorCodeEnum.USER_IS_WHITE_USER),
    COMPRESS_ERROR("109", "身份证照片压缩异常", ErrorCodeEnum.COMPRESS_ERROR),
    INTERFACE_ERROR("110", "征信中心接口异常，请更换流水号 重新发起查询", ErrorCodeEnum.INTERFACE_ERROR),
    MONEY_NOT_ENOUGH("111", "账户状态异常或余额不足", ErrorCodeEnum.MONEY_NOT_ENOUGH),
    OPERATION_FAILURE("201", "操作失败", ErrorCodeEnum.OPERATION_FAILURE),
    SERVER_ERROR("999", "服务状态异常", ErrorCodeEnum.SERVER_ERROR),
    DISALLOW_ACCESS("0002", "禁止访问", ErrorCodeEnum.DISALLOW_ACCESS),
    PARAM_ERROR("0003", "参数异常", ErrorCodeEnum.PARAM_ERROR),
    PARAM_IS_EMPTY("4004", "请求参数为空", ErrorCodeEnum.PARAM_IS_EMPTY),
    PASSWORD_ERROR("4005", "密码错误", ErrorCodeEnum.PASSWORD_ERROR),
    INFORMATION_NOT_EXIST("4006", "信息不存在/查无数据", ErrorCodeEnum.INFORMATION_NOT_EXIST),
    NO_AUTHORITY("4007", "暂无权限查询/未配置相关权限", ErrorCodeEnum.NO_AUTHORITY),
    AUTHORITY_FAILED("4009", "认证失败", ErrorCodeEnum.AUTHORITY_FAILED),
    QUERY_LIMIT_EXCEEDED("4010", "查询超出限制", ErrorCodeEnum.QUERY_LIMIT_EXCEEDED),
    QUERY_NO_DATA("4011", "查无数据", ErrorCodeEnum.QUERY_NO_DATA),
    DATA_EXCEPTION("4012", "数据异常，解析失败", ErrorCodeEnum.DATA_EXCEPTION),
    SIGN_FAILED("4013", "验签失败", ErrorCodeEnum.SIGN_FAILED),
    USER_NOT_EXIST("B0001", "合作商户不存在", ErrorCodeEnum.USER_NOT_EXIST),
    REPORT_NOT_EXIST("B0013", "报告尚未生成，请稍后重试", ErrorCodeEnum.REPORT_NOT_EXIST),
    RESULT_GET_FAIL("B0015", "查询结果未获取成功", ErrorCodeEnum.RESULT_GET_FAIL),
    REPORT_PARSE_ERROR("B0016", "报告解析异常", ErrorCodeEnum.REPORT_PARSE_ERROR),

    ;

    private String code;

    private String desc;

    private ErrorCodeEnum errorCodeEnum;

}
